fix: redact logging of sensitive config & CSRF validation#4955
fix: redact logging of sensitive config & CSRF validation#4955ReenigneArcher merged 3 commits intoLizardByte:masterfrom
Conversation
|
If we're going to do this, can you add some basic regex validation to the allowed origins options so if it's not properly formatted it will at least log an error/warning. I think we basically only need to check that it starts with |
34a366a to
d7f0fa9
Compare
d7f0fa9 to
fd5db54
Compare
* Currently redacts csrf_allowed_origins. * Add simple validation of CSRF entries to ensure they are prefixed with 'https://'. * Individual invalid CSRF entries will be logged unredacted to assist troubleshooting.
fd5db54 to
8b4cf78
Compare
|
Ready for review. I would say that the remaining SonarQube errors can be disregarded, as I'm following the established signature of apply_config's It currently is only doing CSRF validation on the basis that the string is >8 chars and starts with 'https://'. |
Bundle ReportBundle size has no change ✅ |
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4955 +/- ##
=========================================
Coverage 17.99% 18.00%
=========================================
Files 108 108
Lines 23317 23326 +9
Branches 10263 10268 +5
=========================================
+ Hits 4197 4200 +3
+ Misses 16033 14182 -1851
- Partials 3087 4944 +1857
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 48 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|




with 'https://'.
troubleshooting.
Description
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage